﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PuntoDeVentaEdit.aspx.cs" Inherits="CrmContacto.WebApp.App.PuntoDeVentaEdit" %>

<%@ Import Namespace="Web.Framework.Translate" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/Styles/App/CustomerEdit.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <asp:Literal ID="Literal22" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.PuntoDeVenta.EditTitle"]%>' />
    </h2>
    <div class="editionContainerFilter">        
        <p>
            <span class="title2">
                <asp:Literal ID="Literal2" runat="server" Text='<%$ Code: LocalizationProvider.Instance["MaestroBase.Nombre"]%>' />:</span>
            <asp:TextBox ID="txtNombre" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtNombre"
                runat="server" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">
             <asp:Literal ID="Literal6" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.CodigoExterno"]%>' />:</span>
            <asp:TextBox ID="txtCodigoExterno" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"></asp:TextBox>
        </p>
        <div class="clear">
        </div>       
         <p>
            <span class="title2">
                <asp:Literal ID="Literal5" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.Activo"]%>' />:</span>
                <asp:Label ID="lblActivo" runat="server" Text=""></asp:Label>
        </p>        
        <div class="clear">
        </div>   
          <p>
            <span class="title2">
                <asp:Literal ID="Literal7" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.Outlet"]%>' />:</span>
                <asp:CheckBox ID="chkOutlet" runat="server" CssClass="chk" />
        </p>
        <div class="clear">
        </div>       
        <p>
            <span class="title2">
                <asp:Literal ID="Literal11" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.EsFranquicia"]%>' />:</span>
            <asp:CheckBox ID="chkEsFranquicia" runat="server" />           
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">
                <asp:Literal ID="Literal1" runat="server" Text='<%$ Code: LocalizationProvider.Instance["PuntoDeVenta.Duenio"]%>' />:</span>
            <asp:TextBox ID="txtDuenio" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"></asp:TextBox>         
        </p>
        <div class="clear">
        </div>
    </div>
    <br />
    <div class="commandBarDiv">
        <asp:LinkButton ID="lnkGuardar" runat="server" CssClass="guardar" OnClick="lnkGuardar_Click">
            <asp:Literal ID="Literal3" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Guardar"]%>' /></asp:LinkButton>
        <span>|</span>
        <asp:LinkButton ID="lnkCancelar" runat="server" ClientIDMode="Static" CssClass="agregarNuevo"            
            CausesValidation="false" OnClick="lnkCancelar_Click">
            <asp:Literal ID="Literal4" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Volver"]%>' /></asp:LinkButton>
        <div class="clear">
        </div>
    </div>

    <%--Muestro el Listado de Subpuntos de venta--%>
    <div>
     <asp:Panel ID="pnlWrapSubPtosDeVenta" runat="server" ClientIDMode="Static">
     <div>
    <h2 class="h2Excel">
            <asp:Literal ID="Literal8" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.PuntosDeVenta.SubPuntosDeVenta"]%>' />
            <img width="15px" height="15px" id="img1" class="imgExpand" src="/Images/icon_blockexpanded.png"
                onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlSubPuntosDeVenta');"
                alt="" />
            <span class="clear"></span>
        </h2>
        <div class="divExportarAExcelGrid">
                <asp:LinkButton ID="lnkExportarAExcel" CssClass="promolnkExportarAExcel" ClientIDMode="Static"
                    OnClick="lnkExportarAExcel_Click" runat="server">
                    <img style="text-decoration: none; border: 0px; margin-right: 4px" src="../Images/excel.png"
                        alt="" /><asp:Literal ID="Literal24" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdExportarExcel"]%>' /></asp:LinkButton>
            </div>
            <div class="clear">
            </div>
        </div>
        <asp:Panel ID="pnlSubPuntosDeVenta" CssClass="editionContainerForGrid" runat="server"
            ClientIDMode="Static">
            <div class="clear">
            </div>
            <asp:GridView ID="Grid" runat="server" CellPadding="4" ForeColor="#333333"
                ViewStateMode="Enabled" GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id"
                Width="100%" AllowPaging="False" PageSize="15"
                OnRowCommand="Grid_RowCommand" OnRowDataBound="Grid_RowDataBound" >
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="">
                        <HeaderStyle HorizontalAlign="Left" Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEditar" runat="server" ImageUrl="~/Images/editar.png"
                                CommandName="editar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                        </ItemTemplate>
                    </asp:TemplateField>   
                    <asp:TemplateField HeaderText="">
                        <HeaderStyle HorizontalAlign="Left" Width="30px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEliminar" runat="server" ImageUrl="~/Images/eliminar.png"
                                CommandName="eliminar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Codigo" HeaderText='<%$ Code:  LocalizationProvider.Instance["SubPuntoDeVenta.Codigo"] %>'>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Tipo" HeaderText='<%$ Code:  LocalizationProvider.Instance["SubPuntoDeVenta.Tipo"] %>'>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:BoundField>                   
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                    CssClass="gridSortingHeader" />
                <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" CssClass="gridSortingHeader" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" CssClass="gridSortingHeader" />
            </asp:GridView>
        </asp:Panel>
    </asp:Panel>
    </div>

    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }

            document.DirtyCheck = new DirtyCheck();
            document.DirtyCheck.loadControlState();

           AppCommonObj.ConfirmMovePage();              
        });
    </script>
</asp:Content>
